#ifndef LINK_H
#define LINK_H

template <typename T>
struct Link {
    Link* next;
    T object;

    Link() {}
    Link(Link* next) {
        this->next = next;
    }
	~Link() {
		if (next)
			delete next;
	}
	Link* setNext(Link* next) {
		this->next = next;
		return this;
	}
};

#endif // LINK_H

